import Vue from "vue" //引入vue
import Vuex from "vuex" // 引入vuex
Vue.use(Vuex) // 让vue使用vuex

import getters from '@/modules/getters.js'
import common from '@/modules/common.js'
import user from '@/modules/user.js'
import course from '@/modules/course.js'

// 通过vuex构造函数创建store对象
const store = new Vuex.Store({
	modules: {
		common,
		user,
		course
	},
	getters
}) 
export default store //导出store对象